package com.example.cart.mapper;
import com.example.cart.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Configuration;

import java.util.List;
import java.util.Map;


public interface UserMapper {

    User selectByUsernameAndPasswordAndRole(@Param("username") String username,
                                            @Param("password") String password
                                          );

    User selectByUsername(String username);

    int insertSelective(User user);

    int updateByPKSelective(User user);

    List<User> selectAll();

    int selectCountBySearch(Map<String ,Object> params);

    List<User> selectBySearch(Map<String ,Object> params);

    int deleteByPK(Integer id);

}
